<?php
 /*
 * 1626cms 管理中心共用配置文件
 * ============================================================================
 * 版權所有: 1626網絡，并保留所有權利。
 * 網站地址: http://www.1626.com；
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件！您只能在不用于商業目的的前提下對程序代碼進行修改和
 * 使用；不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
*/
if(!defined('IN_QISHI'))
{
die('Access Denied!');
}
session_start();
//header("Cache-control: private");
header("Content-Type:text/html;charset=".QISHI_CHARSET);
error_reporting(E_ERROR);
define('ADMIN_ROOT_PATH', str_replace('include/admin_common.inc.php', '', str_replace('\\', '/', __FILE__)));
require_once(ADMIN_ROOT_PATH.'include/mysql.class.php');
$db = new mysql($dbhost,$dbuser,$dbpass,$dbname);
unset($dbhost,$dbuser,$dbpass,$dbname);
require_once(ADMIN_ROOT_PATH.'include/admin_common.fun.php');
$timestamp = time();
$online_ip = getip();
$_CFG=get_cache('config');
$upfiles_dir="../data/".$_CFG['updir_images']."/";//圖片上傳目錄
$thumb_dir="../data/".$_CFG['updir_thumb']."/";//圖片縮略圖上傳目錄
$certificate_dir="../data/".$_CFG['updir_certificate']."/";//營業執照存放目錄
$resume_photo_dir=$_CFG['site_dir']."data/".$_CFG['resume_photo_dir']."/";//簡歷照片存放目錄
$resume_photo_dir_thumb=$_CFG['site_dir']."data/".$_CFG['resume_photo_dir_thumb']."/";//簡歷照片縮略圖片
$thumbwidth="115";//文章縮略圖寬
$thumbheight="85";//文章縮略圖高
require_once(ADMIN_ROOT_PATH.'include/admin_Smarty.inc.php');
if(!get_magic_quotes_gpc())
{
$_POST = deep_addslashes($_POST);
$_GET = deep_addslashes($_GET);
$_COOKIES = deep_addslashes($_COOKIES);
$_REQUEST = deep_addslashes($_REQUEST);
}
if(PHP_VERSION > '5.1')
{ $timezone = "PRC";
date_default_timezone_set($timezone);
}
 if(empty($_SESSION['admin_id']) && $_REQUEST['act'] != 'login' && $_REQUEST['act'] != 'do_login' && $_REQUEST['act'] != 'logout')
 {
if($_COOKIE['Qishi']['admin_id'] && $_COOKIE['Qishi']['admin_name'] && $_COOKIE['Qishi']['admin_pwd'])
	{
 		if(check_cookie($_COOKIE['Qishi']['admin_name'], $_COOKIE['Qishi']['admin_pwd']))
		{
 			update_admin_info($_COOKIE['Qishi']['admin_name']);
 		}
 	}
else
	{
 		setcookie("Qishi[admin_id]", '', 1, $cookiepath, $cookiedomain);
 		setcookie("Qishi[admin_name]", '', 1, $cookiepath, $cookiedomain);
 		setcookie("Qishi[admin_pwd]", '', 1, $cookiepath, $cookiedomain);
 		exit('<script type="text/javascript">top.location="admin_login.php?act=login";</script>');
}
}
?>
